<?
$this->placeholder("page_title")->set("Table Definiitions");

$this->dojo()->requireModule('dijit.form.Form')
	->addStylesheet('http://ajax.googleapis.com/ajax/libs/dojo/1.2.0/dojo/resources/dojo.css')
	->requireModule('dijit.form.Button')
	->requireModule('dijit.layout.ContentPane')
	->requireModule('dojo.parser')
	->setCdnBase(Zend_Dojo::CDN_BASE_GOOGLE)
	->useCdn();

$this->headStyle()->captureStart();
?>
#content dl.table_links dt { padding: 0px; margin: 0px; font-size: 80%; line-height: 110%}
#content dl.table_links dt a,
#content dl.table_links dt a:link,
#content dl.table_links dt a:visited{padding: 0px; margin: 0px; font-weight: normal}
<?
$this->headStyle()->captureEnd();
	
$this->tabContainer()->captureStart('db', array( 'style'=>"width: 800px; height: 850px"));
?>
<div id="main_db" dojoType="dijit.layout.ContentPane" title="Main Database" selected="true">
<table>
<tr>
	<th>Tables</th>
	<th>Code </th>
</tr>

<tr>
	<td valign="top"><div
	style="height: 700px; overflow: scroll;">
	<?= $this->partial('modules/tableLinks.phtml', array('db_name' => '',
		'adapter' =>  Zend_Db_Table_Abstract::getDefaultAdapter())) ?>
</td>
<td valign=top>
	<iframe name="table_def_" width="500" height="700">
	<p>Click a link at the left</p>
	</iframe>
		</div>
</td>
</table>
</div>
<? foreach (Zupal_Module_Manager::getInstance()->databases() as $db_name => $adapter): ?>
<div id="db2" dojoType="dijit.layout.ContentPane" title="<?= ucwords($db_name) ?>">
	<table>
	<tr>
	<th>Tables</th>
	<th>Code </th>
</tr>
<tr>
	<td valign="top"><div style="height: 700px; overflow: scroll">
	<?= $this->partial('modules/tableLinks.phtml', array('db_name' => $db_name,
		'adapter' => $adapter)) ?>
		</div>
	</td>

	<td valign="top">
		<iframe name="table_def_<?= $db_name ?>" width="500" height="700">
	<p>Click a link at the left</p>
	</iframe>
	</td>
</tr>
	</table>
</div>
<? endforeach; ?>

<?= $this->tabContainer()->captureEnd('db'); ?>